<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <title><#if entity.settleaccountsId??>编辑<#else>新增</#if>结算</title>
    <#include "/view/admin/head.html"/>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />


    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/js/bootstrapValidator.min.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/lang/zh_CN.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-validator-0.5.3/css/bootstrapValidator.min.css" />


    <style type="text/css">
        .list-path {
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;
        }

        .table-class {
            width: 90%;
            text-align: center;
            border: 1px solid #afd9ee;
            margin: 0 auto;
            margin-top: 50px;
        }

        table th {
            width: 20%;
            background-color: #d9edf7;
            text-align: right;
        }

        table td {
            width: 20%;
            text-align: left;
        }


    </style>
    <script type="text/javascript">

        $(function(){
            //初始化



                $('#createtime').datetimepicker({language: 'zh-CN' });







            $('#settleaccountsForm').bootstrapValidator({
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {



                    
                orderNo:{
                    message: '输入订单号出错',
                    validators:{
                        notEmpty: {
                            message: '订单号不能为空'
                        },
                        stringLength:{
                            max: 32,
                            message: '订单号不能超过 32个字符'
                        }
                    }
                }





                    ,
                settlementAmount:{
                        message: '输入结算金额出错',
                        validators:{
                            notEmpty: {
                                message: '结算金额不能为空'
                            },
                            stringLength:{
                                max: 10,
                                message: '结算金额不能超过 10个字符'
                            },
                            regexp: {
                                regexp: /^[1-9][0-9]*$|^[1-9][0-9]*\.[0-9]{1,2}$|^0\.[0-9]{1,2}$/,
                                message:'结算金额只能是金额'
                            }
                        }
                    }




                    ,
                year:{
                    message: '输入年出错',
                    validators:{
                        notEmpty: {
                            message: '年不能为空'
                        },
                        stringLength:{
                            max: 11,
                            message: '年不能超过 11个字符'
                        },
                        regexp: {
                            regexp: /^[0-9]+$/,
                                    message:'年只能是数字'
                        }
                    }
                }

                    ,
                month:{
                    message: '输入月出错',
                    validators:{
                        notEmpty: {
                            message: '月不能为空'
                        },
                        stringLength:{
                            max: 11,
                            message: '月不能超过 11个字符'
                        },
                        regexp: {
                            regexp: /^[0-9]+$/,
                                    message:'月只能是数字'
                        }
                    }
                }
                }
            });


        });

    </script>
</head>
<body>
<#include "/view/admin/listnav.html"/>


<div class="table-class">
    <#include "/view/admin/opermsg.html"/>
    <form id="settleaccountsForm" action="${base}/settleaccounts/save.do"
     >
    <table class="table table-bordered">

                        <input type="hidden" style="display: none" name="settleaccountsId" value="${entity.settleaccountsId!}"/>


                <tr>
                <th>订单号</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="orderNo" name="orderNo" placeholder="请输入订单号" value="${entity.orderNo!}">
                    </div>
                </td>
                

                
                <th>结算类型</th>
                <td>
                    <div class="form-group">
                        <select id="settleType" name="settleType"
                                class="form-control"
                        >
                            <option value="">请选择结算类型</option>
                                            <option value="0" <#if entity.settleType??&&0 == entity.settleType>selected="selected"</#if>>待结账</option>

                                            <option value="1" <#if entity.settleType??&&1 == entity.settleType>selected="selected"</#if>>已结账</option>


                        </select>
                    </div>
                </td>
                </tr>

                <tr>
                <th>结算时间</th>
                <td>
                    <input type="text" class="form-control" value="<#if (entity.createtime)?? >${entity.createtime?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtime" name="createtime" data-date-format="yyyy-mm-dd hh:ii:ss">
                </td>
                

                
                <th>结算金额</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="settlementAmount" name="settlementAmount" placeholder="请输入结算金额" value="${entity.settlementAmount!}">
                    </div>
                </td>
                </tr>


                <tr>
                <th>年</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="year" name="year" placeholder="请输入年" value="${entity.year!}">
                    </div>
                </td>
                

                
                <th>月</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="month" name="month" placeholder="请输入月" value="${entity.month!}">
                    </div>
                </td>
                </tr>


        <tr>
            <td colspan="4" width="100%" style="text-align: center;">
                <input type="submit" class="btn btn-success " value="保存"/>
                <span style="width: 20px;">&nbsp;</span>
                <a class="btn btn-danger " href="javascript:window.history.go(-1)">
                   </span>返回</a>
            </td>
        </tr>

    </table>
</form>




</div>

<script type="text/javascript">

</script>


</body>
</html>
